package com.yb.designpattern.structure.decorate;

public class Decorator implements Component{
	private Component component;
	//装饰器模式将要装饰的类作为参数动态的传入构造方法
	public Decorator(Component component){
		this.component = component;
	}
	public void a(){
		System.out.println("装饰器调用a()增强1111");
		component.a();
		System.out.println("装饰器调用a()增强2222");
	}

}
